﻿/*-------------------------------------------------------------------------
* CLR版本:     4.0.30319.42000
* 创建人:      song 
* 创建时间：   2024/7/11 19:43:07
* 功 能：      N/A
*-------------------------------------------------------------------------*/

using System;
namespace BattleCore
{
    public partial class battle
    {
        //是否是 服务器环境
        public static bool _server = false;

        public static bool _enableLog = true;

        public static Action<string> _log,_error,_warning;

        public static void Log(string text)
        {
            if(_enableLog)
                _log?.Invoke(text);
        }

        public static void Error(string text)
        {
            if (_enableLog)
                _error?.Invoke(text);
        }

        public static void Warning(string text)
        {
            if (_enableLog)
                _warning?.Invoke(text);
        }

        public static void BindLog(Action<string> log,Action<string> error,Action<string> warning)
        {
            _log = log;
            _error = error;
            _warning = warning;
        }
    }
}